
#ifndef ITRIANGLESHAPE_H
#define ITRIANGLESHAPE_H

#include <BTriangle>
#include <BShape>

namespace BWE
{
	class ITriangleShape : public BShape
	{
	public:
		ITriangleShape();
		ITriangleShape(const BVector& va, const BVector& vb, const BVector& vc);
		ITriangleShape(const BTriangle& triangle);

		virtual void copy(const BShape* other)
		{

		}
		virtual BShape* clone() const
		{
			return new ITriangleShape;
		}

		void setTriangle(const BVector& va, const BVector& vb, const BVector& vc);
		void setTriangle(const BTriangle& triangle);
		const BTriangle& triangle() const;

		const BVector& va() const;
		const BVector& vb() const;
		const BVector& vc() const;

		virtual BVector inertia(BReal mass) const;
		virtual BVector vertex(const BVector& direct) const;

	protected:
		virtual void refresh(BBox& box);
		virtual void render(BRender& render);

	public:
		BTriangle	m_triangle;

	};
}

#endif
